<?php

require_once 'LoadLibs.php';

class Test extends ExecuteBean{
	
	public function select($a){
		return $this->load($a);
	}
	
	public function lista($a){
		return $this->exeList($a);
	}
	
	public function getCreate($object){
		$bool = $this->create($object);
		
		if(!$bool){
			echo "FAIL";
		}else{
			echo "OK";
		}
	}
	
	public function getDelete($object){
		$bool = $this->delete($object);
		
		if(!$bool){
			echo "FAIL";
		}else{
			echo "OK";
		}
	}
	
	public function getUpdate($object){
		$bool = $this->update($object);
		
		if(!$bool){
			echo "FAIL";
		}else{
			echo "OK";
		}
	}
	
	public function getReset($object){
		$bool = $this->resetTable($object);
		
		if(!$bool){
			echo "FAIL";
		}else{
			echo "OK";
		}
	}
	
}

require_once 'entities/Actions.php';
require_once 'entities/Cities.php';
require_once 'entities/Controllers.php';
require_once 'entities/GoogleReferer.php';

$t = new Test();
$a = new GoogleReferer();

// $a->setId(1);
// $a->setWhendate();
$a->setFromip('test de string');
$a->setKeywords('test n°2 de string');

// $b = new GoogleReferer();
// $b->setId(1);
// // $b->setWhendate('asda');
// $b->setFromip('98n123123');
// $b->setKeywords('hola moróasdasdasd');
// $t->getCreate($a);
// $t->getUpdate($a);
$t->getReset($a);
// $t->getDelete($a);
// $list= $t->lista($a);
// $obj = $list[0];

// var_dump($a);

?>
